import React from 'react';
import 'font-awesome/scss/font-awesome.scss';
import { Link } from 'react-router-dom'
import './MyActivityItem.scss';
let logo = require('../../static/images/login_bg.jpg');

export default class MyActivityItem extends React.PureComponent {

    constructor(props,context){
        super(props,context);
    }

    render() {

        console.log(this.props.myActivityList)
        return (
            <div className="MyActivityItem">

                {this.props.myActivityList.map((v,i)=>{
                    return (
                        <div className="item" key={v.id}>
                            <img className="left" src={logo}/>
                            <div className="right">
                                <div className="t1">{v.title}</div>
                                <div className="t2">{v.describe}</div>
                                <div className="t2">{v.startTime}到{v.endTime}</div>
                            </div>
                            <div className="foot">
                                <div className="btn"><i className="fa fa-address-card fa-fw"></i>报名表</div>
                                <Link to={`/EditActivity/${v.id}`}>
                                    <div className="btn"><i className="fa fa-edit fa-fw"></i>编辑活动</div>
                                </Link>
                                <div className="btn"><i className="fa fa-qrcode fa-fw"></i>二维码</div>
                                <div className="btn"><i className="fa fa-reorder fa-fw"></i>更多操作</div>
                            </div>
                        </div>
                    )
                })}
                
            </div>
        )
    }
}
